# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-webcolors
pkgver=1.13
pkgrel=2
pkgdesc="A library for working with color names and color value formats defined by the HTML and CSS specifications for use in documents on the Web"
url="https://github.com/ubernostrum/webcolors"
license=('BSD')
arch=('any')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-pytest')
source=("https://pypi.io/packages/source/w/webcolors/webcolors-$pkgver.tar.gz")
sha512sums=('074aaf135ac6b0025b88b731d1d6dfa4c539b4fff7195658cc58a4326bb9f0449a231685d312b4a1ec48ca535a838bfa5c680787fe0e61473a2a092c448937d0')

build() {
  cd webcolors-$pkgver
  python -m build -nw
}

check() {
  cd webcolors-$pkgver
  PYTHONPATH="$PWD/build/lib" pytest
}

package() {
  cd webcolors-$pkgver
  python -m installer -d "$pkgdir" dist/*.whl
}
